[mirrors]
http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz

[main]
filesize=7955839
sha512=a852b8e46ee55568dce9d23a30a9dbd1c770c2d2a4bc91e1c3177d723b31b32c5d69d19704a93f165891b409b9dd2cc65723372044e2bd0ee49ed59a11512651

[deps]

[build]
# Shellshock patching (CVE-2014-7169 and CVE-2014-6271)
patch -p0 < "$K"/bash43-import-functions.patch

# FIXME: bash has a ton of configure tests with broken defaults
# for crosscompiling. breakage could for example be introduced by
# "checking for offset of exit status... 0" (due to crosscompile)
# on a native x86_64 run we get 8 (bash_cv_wexitstatus_offset)
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags" LDFLAGS="$optldflags -static" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  --without-bash-malloc \
  --disable-rpath --enable-history bash_cv_getenv_redef=no \
  --enable-job-control bash_cv_sys_named_pipes=yes \
  --disable-nls
#  --with-installed-readline ac_cv_rl_version=5.0 \
make -j$MAKE_THREADS READLINE_LIB=lib/readline/libreadline.a
make DESTDIR="$butch_install_dir" install
